{% extends "base.html" %}
{% block menu %}
	
 <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="#">Project Manager System</a>
          <div class="nav-collapse collapse">
            <ul class="nav">
              <li><a href="/admproyecto/">Administrar Proyecto</a></li>
              <li class="active"><a href="/admusuario/">Administrar Usuario</a></li>
              <li><a href="/">Logout</a></li>
              <li><a href="#contact">Usuario: {{session['username']}}</a></li>
              </ul>
          </div>
       </div>
     </div>
</div>
{%endblock%}


{%block content%}
<div class="container">
	<h3>Crear Usuario</h3>
	<hr>
	<p>Complete los datos del usuario:</p>
        <form action="{{url_for('crearusuario')}}" method="post">
            <p>Nombre<small class="text-error">(*)</small>:
            {%  with messages = get_flashed_messages(category_filter=["nombre"]) %}
	  			{% if messages %}
	  				{% for message in messages %}
   						<small class="text-error">{{ message }}</small>	
   					{% endfor %}    					
				{% endif %}
			{% endwith %}         
	    	<br/>
            <input type="text" name="nombre" value="{{session['aux1']}}"/></p>
            <p>Usuario<small class="text-error">(*)</small>	:
            {%  with messages = get_flashed_messages(category_filter=["usuario"]) %}
	  			{% if messages %}
	  				{% for message in messages %}
   						<small class="text-error">{{ message }}</small>	
   					{% endfor %}  	  			
				{% endif %}
			{% endwith %}            
            <br/>
            <input type="text" name="usuario" value="{{session['aux2']}}"/></p>
            <p>Clave<small class="text-error">(*)</small>:
            {%  with messages = get_flashed_messages(category_filter=["clave"]) %}
	  			{% if messages %}
   					{% for message in messages %}
   						<small class="text-error">{{ message }}</small>	
   					{% endfor %}  	    					
				{% endif %}
			{% endwith %}
            <br/>
            <input type="password" name="clave" /></p>  
            <p><input type="checkbox" name="admin" /> Es Administrador</p>
            <p></p>
            <p><input class="btn btn-success" type="submit" value="Aceptar" />
            <a class="btn btn-inverse" href="/admusuario/">Cancelar</a></p>
        </form>
</div>
{%endblock%}
